/**
 * @author [siwi]
 * @email [siwi@siwi.me]
 * @create date 2017-09-16 11:42:01
 * @modify date 2017-09-16 11:42:01
 * @desc [description]
*/


const { mongoose, Schame } = require('../Mongoose')

const Table = new Schame({
    user_id: {
        type: String,
        required: true
    },
    client_id: {
        type: String,
        require: true
    },
    name: {
        type: String
    },
    access_token: {
        type: String
    },
    scopes: {
        type: String
    },
    revoked: {
        type: Boolean,
        default: false
    },
    expires_at: {
        type: Date
    }
})
const OauthAccessToken = mongoose.model('OauthAccessToken', Table)
module.exports = OauthAccessToken